import { dialog, BrowserWindow } from 'electron'
import { save_python } from './file'

export function opendialog(browserWindow: BrowserWindow) {
  return dialog.showOpenDialog(browserWindow, {
    title: '请选择文件',
    defaultPath: save_python,
    filters: [
      { name: 'Python', extensions: ['py'] },
      { name: 'Xml', extensions: ['xml'] },
    ]
  })
}